# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DriveActivity.V2.Model.ActionDetail do
  @moduledoc """
  Data describing the type and additional information of an action.

  ## Attributes

  *   `appliedLabelChange` (*type:* `GoogleApi.DriveActivity.V2.Model.AppliedLabelChange.t`, *default:* `nil`) - Label was changed.
  *   `comment` (*type:* `GoogleApi.DriveActivity.V2.Model.Comment.t`, *default:* `nil`) - A change about comments was made.
  *   `create` (*type:* `GoogleApi.DriveActivity.V2.Model.Create.t`, *default:* `nil`) - An object was created.
  *   `delete` (*type:* `GoogleApi.DriveActivity.V2.Model.Delete.t`, *default:* `nil`) - An object was deleted.
  *   `dlpChange` (*type:* `GoogleApi.DriveActivity.V2.Model.DataLeakPreventionChange.t`, *default:* `nil`) - A change happened in data leak prevention status.
  *   `edit` (*type:* `GoogleApi.DriveActivity.V2.Model.Edit.t`, *default:* `nil`) - An object was edited.
  *   `move` (*type:* `GoogleApi.DriveActivity.V2.Model.Move.t`, *default:* `nil`) - An object was moved.
  *   `permissionChange` (*type:* `GoogleApi.DriveActivity.V2.Model.PermissionChange.t`, *default:* `nil`) - The permission on an object was changed.
  *   `reference` (*type:* `GoogleApi.DriveActivity.V2.Model.ApplicationReference.t`, *default:* `nil`) - An object was referenced in an application outside of Drive/Docs.
  *   `rename` (*type:* `GoogleApi.DriveActivity.V2.Model.Rename.t`, *default:* `nil`) - An object was renamed.
  *   `restore` (*type:* `GoogleApi.DriveActivity.V2.Model.Restore.t`, *default:* `nil`) - A deleted object was restored.
  *   `settingsChange` (*type:* `GoogleApi.DriveActivity.V2.Model.SettingsChange.t`, *default:* `nil`) - Settings were changed.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :appliedLabelChange => GoogleApi.DriveActivity.V2.Model.AppliedLabelChange.t() | nil,
          :comment => GoogleApi.DriveActivity.V2.Model.Comment.t() | nil,
          :create => GoogleApi.DriveActivity.V2.Model.Create.t() | nil,
          :delete => GoogleApi.DriveActivity.V2.Model.Delete.t() | nil,
          :dlpChange => GoogleApi.DriveActivity.V2.Model.DataLeakPreventionChange.t() | nil,
          :edit => GoogleApi.DriveActivity.V2.Model.Edit.t() | nil,
          :move => GoogleApi.DriveActivity.V2.Model.Move.t() | nil,
          :permissionChange => GoogleApi.DriveActivity.V2.Model.PermissionChange.t() | nil,
          :reference => GoogleApi.DriveActivity.V2.Model.ApplicationReference.t() | nil,
          :rename => GoogleApi.DriveActivity.V2.Model.Rename.t() | nil,
          :restore => GoogleApi.DriveActivity.V2.Model.Restore.t() | nil,
          :settingsChange => GoogleApi.DriveActivity.V2.Model.SettingsChange.t() | nil
        }

  field(:appliedLabelChange, as: GoogleApi.DriveActivity.V2.Model.AppliedLabelChange)
  field(:comment, as: GoogleApi.DriveActivity.V2.Model.Comment)
  field(:create, as: GoogleApi.DriveActivity.V2.Model.Create)
  field(:delete, as: GoogleApi.DriveActivity.V2.Model.Delete)
  field(:dlpChange, as: GoogleApi.DriveActivity.V2.Model.DataLeakPreventionChange)
  field(:edit, as: GoogleApi.DriveActivity.V2.Model.Edit)
  field(:move, as: GoogleApi.DriveActivity.V2.Model.Move)
  field(:permissionChange, as: GoogleApi.DriveActivity.V2.Model.PermissionChange)
  field(:reference, as: GoogleApi.DriveActivity.V2.Model.ApplicationReference)
  field(:rename, as: GoogleApi.DriveActivity.V2.Model.Rename)
  field(:restore, as: GoogleApi.DriveActivity.V2.Model.Restore)
  field(:settingsChange, as: GoogleApi.DriveActivity.V2.Model.SettingsChange)
end

defimpl Poison.Decoder, for: GoogleApi.DriveActivity.V2.Model.ActionDetail do
  def decode(value, options) do
    GoogleApi.DriveActivity.V2.Model.ActionDetail.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DriveActivity.V2.Model.ActionDetail do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
